package ssn.zone.service.impl;

import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import ssn.common.code.service.CodeService;
import ssn.common.code.vo.CodeVO;
import ssn.zone.service.ZoneService;
import egovframework.rte.fdl.cmmn.AbstractServiceImpl;
import egovframework.rte.fdl.string.EgovDateUtil;

/**  
 * @Class Name : 
 * @Description : 
 * 
 * @author ksh
 * @since 2013. 09.26
 * @version 1.0
 * @see
 */
@SuppressWarnings({"rawtypes","unchecked"})
@Service("zoneService")
public class ZoneServiceImpl extends AbstractServiceImpl implements ZoneService {
	
	@Resource(name = "codeService")
    private CodeService codeService;
   
	public void insertZoneInfo(CodeVO vo) throws Exception{
		vo.setScc_code_key(vo.getScc_ref_key()+EgovDateUtil.getCurrentDateTimeAsString());
		codeService.insertCodeInfo(vo);
	}
	public void updateZoneInfo(CodeVO vo) throws Exception{
		codeService.updateCodeInfo(vo);
	}
	public void deleteZoneInfo(CodeVO vo) throws Exception{
		codeService.deleteCodeInfo(vo);
	}
	public Map selectZoneList(CodeVO vo) throws Exception{
		Map resultMap = new HashMap();
		resultMap.put("resultList", codeService.selectCodeList(vo));
		resultMap.put("resultListCnt", codeService.selectCodeListCnt(vo));
		return resultMap;
	}
	public CodeVO selectZoneInfo(CodeVO vo) throws Exception{
		return codeService.selectCodeInfo(vo);
	}
}
